function init(config) {
  return {
    getShow(params) {
      console.log(params)
      const url = `${config.pre}agent/${Cookies.get('areaCode')}/ascend?limit=${params.limit}&offset=${params.offset}`
      const opt = {
        method: 'GET',
        headers: {
          Authorization: Cookies.get('token')
        }
      }
      return fetch(url, opt)
    },
    getShowHead(params) {
      console.log(params)
      const url = `${config.pre}agent/${Cookies.get('areaCode')}/head`
      const opt = {
        method: 'GET',
        headers: {
          Authorization: Cookies.get('token')
        }
      }
      return fetch(url, opt)
    },
    // getShowHead(params) {
    //   console.log(params)
    //   const url = `${config.pre}agent/${Cookies.get('areaCode')}/ascend?limit=${params.limit}&offset=${params.offset}`
    //   return fetch(url, {
    //     method: 'GET',
    //     headers: {
    //       Authorization: Cookies.get('token'),
    //       'Content-type': 'application/json'
    //     }
    //   });
    // },
  }
}

export default init